package com.zgm.ch06.aop.aspectJ.advice.after._2_5_2_2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.zgm.ch06.aop.services.StockService;
import com.zgm.ch06.aop.services.UserService;

public class AfterDemo {

	public static void main(String[] args) {
		ApplicationContext ac = new ClassPathXmlApplicationContext("com/zgm/ch06/aop/aspectJ/advice/after/_2_5_2_2/_2_5_2_2-context.xml");////
		
		StockService stockService = (StockService) ac.getBean("stockService"); 
//		
//		System.out.println(stockService.getStockLevel("ABC"));
		
		UserService userService = (UserService) ac.getBean("userService");
//		userService.login("zgm");
//		System.out.println(stockService.getStockLevel("EFG"));
		userService.findById(123456);
	}
}
